/*  ----------------------------------------------------------------------------
 *  Arello Mobile
 *  Fast 3d Engine
 *  ----------------------------------------------------------------------------
 * Except where otherwise noted, this work is licensed under
 * http://creativecommons.org/licenses/by/3.0
 */

#ifndef __NOISE_MUSICCHANGER_ANDROID_H__
#define __NOISE_MUSICCHANGER_ANDROID_H__

#include <filesystem/String.hpp>
#include <NoCopy.h>
#include <AutoPtr.h>

namespace liba
{
namespace noise
{

class MusicChanger : private Nocopy
{
	filesystem::String music_name;
	filesystem::String next_music_name;
	const double fadeout_speed;
	double global_volume;
	double current_volume;
public:
	explicit MusicChanger(double fadeout_time);
	virtual ~MusicChanger();
	void change_music(const filesystem::String & next_music);
	void life_cycle(double delta_time);
	double get_volume()const
	{
		return global_volume;
	}
	void change_volume(double volume);
};

} // namespace noise
} // namesapce liba
using namespace liba;

#endif //__NOISE_MUSICCHANGER_ANDROID_H__

